The present invention relates to recording medium control methods, data management apparatuses, and recording media, and more particularly to a recording medium control method, a data management apparatus, and a recording medium for data management by duplicating data in each of a plurality of recording media.
Commercial transactions using electronic money have been conducted of late. For the commercial transactions using electric money, management apparatuses employing IC cards as storage devices for receiving and transferring value data such as electronic money have been developed. Normally, an IC card employed in such management apparatuses is provided with a unique IC chip having a particular authentication function. Such an IC card is allowed to exchange data only with an IC card or an apparatus having the same IC chip, thereby increasing the reliability of the data.
However, the reliability of the data is insufficient since the data is still exchangeable between the IC cards or the IC card and the apparatus having the same IC chip. Therefore, there have been demands for further increasing the data reliability.
FIG. 1 is a block diagram showing a conventional example.
IC cards 2-1 through 2-n are attached to an electronic money management apparatus 1. The electronic money management apparatus 1 is connected via a network 3 to a terminal device 4.
The electronic money management apparatus 1 stores value data such as electronic money in the IC cards 2-1 through 2-n, and exchanges the value data such as electronic money with the terminal device 4 via the network 3.
The electronic money management apparatus 1 is composed of communication parts 5 and 6, a nonvolatile memory 7, a CPU 8, and connection terminals 9-1 through 9-n. The communication part 5 controls communication with the network 3. The communication part 6 controls communication with the IC cards 2-1 through 2-n. 
The nonvolatile memory 7 stores an apparatus characteristic number characteristic of the electronic money management apparatus 1. The CPU 8 obtains value data to be stored in the IC cards 2-1 through 2-n in accordance with the exchange of the value data, and stores the obtained value data in the IC cards 2-1 through 2-n. The connection terminals 9-1 through 9-n are connected to the IC cards 2-1 through 2-n, respectively.
Each of the IC cards 2-1 through 2-n is composed of an external terminal 10 and an IC chip 11. The external terminal 10 is connected to one of the connection terminals 9-1 through 9-n of the electronic money management apparatus 1 so as to connect the IC chip 11 with the electronic money management apparatus 1.
The IC chip 11 is composed of communication part 12, a CPU 13, a nonvolatile memory 14, and a volatile memory 15. The communication part 12 controls communication with the electronic money management apparatus 1.
The CPU 13 controls writing the value data to and reading the value data from the nonvolatile memory 14 in accordance with a program stored in the nonvolatile memory 14. The nonvolatile memory 14 includes an EEPROM and stores the value data and the program executed by the CPU 13. The volatile memory 15 is used as a working storage for processing by the CPU 13. For instance, program control data is loaded thereinto from the nonvolatile memory 14.
In the conventional electronic money management apparatus 1, no value data stored in the IC cards 2-1 through 2-n are duplicated.
Therefore, if the IC cards 2-1 through 2-n are extracted from the electronic money management apparatus 1 or otherwise damaged, the value data of the extracted or damaged IC cards 2-1 through 2-n are lost, so that services cannot be provided.
If value data is to be duplicated in the same IC card in the case of making a duplicate of the value data, no value data can be read out when the IC card is extracted or damaged. Therefore, there is no meaning in duplicating the value data. Accordingly, in the case of duplicating the value data, it is necessary to make a duplicate in a different IC card. In the case of duplicating the value data in a different IC card, the value data is preserved by the different IC card even if the original IC card is lost or damaged.
However, once the IC card is duplicated, a false IC card may be issued based on a false claim that either one of the IC cards is damaged. Further, there is a problem in that when a duplicate of the IC card is made by using an IC card that is a duplicate of another IC card, the value data already stored in the IC card for backup may be deleted mistakenly by a wrong operation of an operator.
The conventional electronic money management apparatus 1 employs the IC cards 2-1 through 2-n for managing the value data. Each of the IC cards uses the EEPROM for retaining the value data. The number of times writing is performed to the EEPROM is physically limited.
Therefore, if the number of times writing is performed to a certain region of the EEPROM increases, use of the other regions of the EEPROM with a smaller number of write operations is limited by the life of the region with a larger number of write operations, thus causing the problem of inefficiency.
The present invention is made in view of the above-described points, and an object of the present invention is to provide a recording medium control method, a data management apparatus, and a recording medium with high reliability.
The above object of the present invention is achieved by a recording medium control method for controlling access to a plurality of recording media each storing duplicated data, wherein each of the recording media stores identification information for identifying which of the recording media stores the duplicated data, it is determined whether the data of the recording media are consistent with each other based on the identification information, the access to the recording media is enabled if it is determined that the data of the recording media are consistent with each other, and the access to the recording media is inhibited if it is determined that the data of the recording media are inconsistent with each other.
Further, according to the present invention, each of the recording media may store, as the identification information, first identification information for self-identification and second identification information for identifying another of the recording media, and it may be determined that there is data consistency between one of the recording media and the rest of the recording media if the first identification information of the one of the recording media exists as the second identification information in the rest of the recording media.
Further, according to the present invention, each of the recording media may store third identification information for identifying an apparatus in which the recording media are loaded, and the apparatus is enabled to control the recording media when the third identification information matches identification information of the apparatus.
The above object of the present invention is also achieved by a data management apparatus loaded with a plurality of recording media each storing duplicated data and controlling access to the loaded recording media, the data management apparatus including an access control part determining whether the duplicated data of the recording media are consistent with each other and controlling the access to the recording media based on a result of the determination, wherein each of the recording media stores identification information for identifying which of the recording media stores the duplicated data, the access control part makes the determination based on the identification information, and the access control part enables the access to the recording media if said access control part determines that the data of the recording media are consistent with each other and inhibits the access to the recording media if said access control part determines that the data of the recording media are inconsistent with each other.
Further, according to the present invention, each of the recording media may store, as the identification information, first identification information for self-identification and second identification information for identifying another of the recording media, and the access control part may determine that there is data consistency between one of the recording media and the rest of the recording media if the first identification information of the one of the recording media exists as the second identification information in the rest of the recording media.
Further, according to the present invention, each of the recording media may store third identification information for identifying the data management apparatus in which the recording media are loaded, and the access control part enables the data management apparatus to control the recording media when the third identification information matches identification information of the data management apparatus.
Further, according to the present invention, each of the recording media may store version information updated every time the data thereof is updated, and the access control part may record the data of a first one of the recording media on a second one of the recording media so as to set the first and second recording media controllable if the version information of the first and second information media are different from each other, the version information of the first recording medium being updated more times than that of the second recording medium.
Further, the data management apparatus according to the present invention may further include a version number update part updating the version information of each of the recording media when the recording media are removed from the data management apparatus in which the recording media are loaded.
Further, according to the present invention, each of the recording media may store determination information for determining whether the recording medium is independently controllable, and the access control part may recognize the determination information of each of the recording media if the access control part determines that there is no data consistency between the recording media, and set one of the recording media controllable if the determination information of the one of the recording media shows that the one of the recording media is independently controllable.
Further, according to the present invention, each of the recording media may store determination information for determining whether the recording medium is in use, and the access control part may inhibit the access to the recording media if the determination information shows that at least one of the recording media is in use, and sets the recording media usable if the determination information shows that all of the recording media are unused.
Further, according to the present invention, each of the recording media may store determination information for determining whether the data recorded on the recording medium is valid or invalid, and the access control part may inhibit the access to the recording media if the determination information of one of the recording media shows that the data recorded thereon is invalid.
Further, according to the present invention, each of the recording media may have the data stored divided into a plurality of data blocks, and store data identification information for identifying divided pieces of the data with corresponding data block identification information for identifying the data blocks storing the divided pieces of the data, and the access control part may recognize the data block identification information based on the data identification information and makes accessible one of the data blocks which one stores a required one of the divided pieces of the data based on the data block identification information.
Further, the data management apparatus according to the present invention may further include a monitoring part monitoring an abnormality in each of the recording media storing abnormal information indicating whether another of the recording media has the abnormality, and an information recording part recording information indicating occurrence of the abnormality in one of the recording media on the rest of the recording media as the abnormal information if the abnormality in the one of the recording media is detected.
The above object of the present invention is further achieved by a recording medium for recording data including a plurality of data blocks for recording the data, the data blocks each including a data recording part recording a number of times the data is updated as number management information, and a recording control part moving the data stored in the data block to a next available one of the data blocks if the number management information reaches a preset given number of times.